{% extends 'myadmin/index.html' %}

{% block title %}
<title>后台-订单详情列表</title>
{% endblock %}

{% block content %}
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title  am-cf" style="font-size: 26px;color: #3599d6;">订单详情列表</div></div>
                <div class="widget-body  am-fr">
                    <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                        <div class="am-form-group">
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                </div>
                            </div>
                        </div>
                    </div>
                    <form>
                        <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                            <div class="am-form-group tpl-table-list-select">
                            </div>
                        </div>
                        <div class="am-u-sm-12 am-u-md-12 am-u-lg-3">
                            <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                            </div>
                        </div>
                    </form>
                    <div class="am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>状态</th>
                                    <th>商品主图</th>
                                    <th>商品名</th>
                                    <th>单价</th>
                                    <th>购买量</th>
                                    <th>收件人</th>
                                    <th>收件电话</th>
                                    <th>收件地址</th>
                                    <th>添加时间</th>
                                    <th>购买人</th>
                                </tr>
                            </thead>
                            <tbody>
                                {% for u in data %}
                                <tr class="gradeX">
                                    <td class="am-text-middle">{{ u.id }}</td>
                                    <td class="am-text-middle">
                                        {% if u.orderid.status == 0 %}                                            
                                            未支付
                                        {% elif u.orderid.status == 1 %}
                                            未发货
                                        {% elif u.orderid.status == 2 %}
                                            已发货
                                        {% elif u.orderid.status == 3 %}                                           
                                            已收货
                                        {% endif %}
                                    </td>
                                    <td class="am-text-middle">
                                        <img src="{{ u.pic_url }}" class="tpl-table-line-img" alt="">
                                    </td>
                                    <td class="am-text-middle">{{ u.title }}</td>
                                    <td class="am-text-middle">{{ u.price }}</td>
                                    <td class="am-text-middle">{{ u.num }}</td>
                                    <td class="am-text-middle">{{ u.orderid.receiver }}</td>
                                    <td class="am-text-middle">{{ u.orderid.receivephone }}</td>
                                    <td class="am-text-middle">{{ u.orderid.receiveaddress }}</td>
                                    <td class="am-text-middle">{{ u.addtime }}</td>
                                    <td class="am-text-middle">{{ u.orderid.uid.username }}</td>
                                </tr>
                                {% endfor %}
                                <!-- more data -->
                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">
                        <div class="am-fr">
                            <ul class="am-pagination tpl-pagination">
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}